package director;

import behavior.command.Broker;
import behavior.command.BuyOrder;
import behavior.command.Invoker;
import behavior.command.SellOrder;

public class CommandDirector {

    public static void main(String[] args) {
        Invoker stockInvoker = new Invoker();
        Broker ht = new Broker("华泰证券");
        stockInvoker.setOrder(new BuyOrder(ht));
        stockInvoker.invoke("贵州茅台",100);

        stockInvoker.setOrder(new SellOrder(ht));
        stockInvoker.invoke("比亚迪",30);
    }
}
